home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual Foxpro 6.0 (Ent. Edition) / Vf6ent Extractor.EXE / TOOLS / XSOURCE / XSOURCE.ZIP / vfpsource / wizards / Wztable / wztable.prg < prev    next >
Encoding:
Text File  |  1998-05-01  |  1.8 KB  |  64 lines

  1. PARAMETERS cOutputVarname, p2, p3, p4, p5, p6, p7, p8, p9
  2.  
  3. * cOutputVarname holds the name of the wizard.app memvar, as a char string, that will return the name
  4. * of the created file to the project manager. This parameter is passed into the wizard in the CREATE 
  5. * statement below. Wiztemplate handles storing the name of the created file to the contents of this memvar.
  6.  
  7. * cOutputFilename is a memvar created in this program that will also hold the name of the created file, to
  8. * support the MODIFY and BROWSE options below, coming out of the wizard. It gets updated in the ProcessOutput
  9. * method of the wizard's engine, and has nothing to do with Wiztemplate or the memvar that gets passed back to
  10. * the Project Manager.
  11.  
  12. private cClassLib
  13. local cOnError, lError
  14.  
  15. m.wzt_outoption = 1
  16. m.cOutputFilename = ""
  17.  
  18. m.cClassLib = set('classlib')
  19.  
  20. SET CLASSLIB TO wztable
  21.  
  22. PUBLIC oWizard
  23.  
  24. * The name "oWizard" is used in automated testing and should *NOT* be changed.
  25. * The wizard will save and restore the environment, so no need to do it here
  26.  
  27. oWizard = CREATE("TableWizard",m.cOutputVarname, m.p2, m.p3, m.p4, m.p5, m.p6, m.p7, m.p8, m.p9)
  28. #if .f.
  29. on error &cOnError
  30. #endif
  31.  
  32. if type('oWizard') = 'O' .and. .not. isnull(oWizard)
  33.     oEngine.aEnvironment[17,1] = m.cClassLib
  34.     oWizard.Show
  35. endif
  36. if type('oWizard') = 'O' .and. .not. isnull(oWizard)
  37.     * It must be modeless, so leave it alone
  38. else
  39.     release oWizard
  40.     CLEAR CLASS TableWizard
  41.     CLEAR CLASS wiztemplate
  42. endif
  43.  
  44. SET MESSAGE TO
  45.  
  46. IF TYPE("m.cOutputFilename") = "C"
  47.     IF NOT EMPTY(m.cOutputFilename) 
  48.         IF FILE(m.cOutputFilename)
  49.             DO CASE
  50.                 CASE m.wzt_outoption = 2
  51.                     USE (m.cOutputFilename)
  52.                       BROWSE NORMAL NOWAIT
  53.                 CASE m.wzt_outoption = 3
  54.                     USE (m.cOutputFilename) EXCLUSIVE
  55.                     MODIFY STRUCTURE
  56.             ENDCASE
  57.         ENDIF
  58.     ENDIF
  59. ENDIF
  60.  
  61.  
  62.  
  63. RETURN
  64.